package com.eightbears.beboy.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eightbears.beboy.R;
import com.eightbears.beboy.base.util.CommonUtils;
import com.eightbears.beboy.base.util.SPUtil;
import com.eightbears.beboy.entity.HongBaoEntity;

public class PostPackageAdapter extends BaseQuickAdapter<HongBaoEntity.HongBao, BaseViewHolder> {


    public PostPackageAdapter() {
        super(R.layout.item_post_package, null);
    }


    @Override
    protected void convert(BaseViewHolder baseViewHolder, HongBaoEntity.HongBao hongBaoEntity) {
        baseViewHolder.setText(R.id.tv_date, CommonUtils.TimeStamp2Date(hongBaoEntity.getEnd_at(), "yyyy-MM-dd"))
                .setText(R.id.tv_phone, SPUtil.getUser().getData().getMobile())
                .addOnClickListener(R.id.ll_item);
    }


}